package com.lili.collection.restful.base;


import com.lili.collection.restful.enums.InterfaceType;

/**
 * 接口请求工厂
 *
 * @author: lili
 * @since: 2023/6/12 10:32
 */
public class InterfaceRequestFactory {

    /**
     * 获取接口请求类型
     *
     * @param type 接口类型
     * @return 接口请求类型
     */
    public static IInterfaceRequest getInfRequest(InterfaceType type) {
        if (InterfaceType.RESTFUL.equals(type)) {
            return new RestfulRequest();
        } else if (InterfaceType.YFWJCPT_SDK.equals(type)) {
            return new YfwjcptSdkRequest();
        }  else {
            throw new IllegalArgumentException("暂不支持该类型接口！");
        }
    }
}